package com.zhangj.dubbo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.zhangj.dubbo.service.HelloService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description
 * @Author zhangjie
 * @Date 2021/12/25 16:34
 * @Version 1.0
 */

@RestController
public class HelloController {
    @Reference
    private HelloService helloService;

    @RequestMapping("/hello")
    public String getHello(String name){
        return helloService.sayHello(name);
    }

}
